local wdtx__zhenqiaoCardSkill = fk.CreateSkill {
  name = "wdtx__zhenqiao_skill",
}


wdtx__zhenqiaoCardSkill:addEffect("cardskill", {
  name = "wdtx__zhenqiao_skill",
  prompt = "#wdtx__zhenqiao_skill",
  mod_target_filter = Util.TrueFunc,
  can_use = function(self, player, card)
    return not player:isProhibited(player, card)
  end,
  on_use = function(self, room, cardUseEvent)
    if not cardUseEvent.tos or #cardUseEvent.tos == 0 then
      cardUseEvent.tos = {cardUseEvent.from }
    end
  end,
  on_effect = function(self, room, effect)
    local target = effect.to
    if target.dead then return end
    local zhenqiaolv = effect.card:getMark("@zhenqiaolv")
    if not target:hasSkill("zhenqiao") then
      if zhenqiaolv > 0 then 
        room:setPlayerMark(target,"@zhenqiaolv",zhenqiaolv)
      end
      room:handleAddLoseSkills(target,"zhenqiao|#losezqSkill",nil,false)
    end
  end
})

return wdtx__zhenqiaoCardSkill